//package com.preparation.mapper;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.preparation.domain.PostComment;
//import org.apache.ibatis.annotations.Mapper;
//import org.apache.ibatis.annotations.Select;
//import org.apache.ibatis.annotations.Update;
//import java.util.List;
//
//@Mapper
//public interface PostCommentMapper extends BaseMapper<PostComment> {
//
//    //置顶  取消置顶
//    @Update("update tbl_post_comment set is_sticky=#{isSticky} where id=#{id}")
//    int sticky(Integer id, Integer isSticky);
//
//    //根据用户id查询收到的评论
//    @Select("select c.*,p.title from tbl_post_comment c " +
//            "inner join tbl_post p on c.post_id=p.id " +
//            "where user_id=#{userId} and replier_id!=#{userId} " +
//            "order by c.create_time desc")
//    List<PostComment> getByUid(Integer userId);
//}
